package com.xiaoc.bulldozer.common.service.impl;

import com.xiaoc.bulldozer.common.dao.SaleChannelMapper;
import com.xiaoc.bulldozer.common.dto.SaleChannelQueryDto;
import com.xiaoc.bulldozer.common.model.SaleChannel;
import com.xiaoc.bulldozer.common.service.SaleChannelService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * SaleChannel Service 实现类
 * 
 * @author wj
 * 
 * @date 2019-05-06 11:24:46
 */
@Service("saleChannelService")
public class SaleChannelServiceImpl implements SaleChannelService {

    @Resource
    private SaleChannelMapper SaleChannelMapper;

    @Override
    public Integer getSaleChannelCountByCondition(SaleChannelQueryDto SaleChannelQueryDto) {
        return SaleChannelMapper.getSaleChannelCountByCondition(SaleChannelQueryDto);
    }

    @Override
    public List<SaleChannel> getSaleChannelListByCondition(SaleChannelQueryDto SaleChannelQueryDto) {
        return SaleChannelMapper.getSaleChannelListByCondition(SaleChannelQueryDto);
    }

    @Override
    public SaleChannel getSaleChannelById(Integer id) {
        return SaleChannelMapper.getSaleChannelById(id);
    }

    @Override
    public SaleChannel getSaleChannelByOriginalName(String originalName) {
        return SaleChannelMapper.getSaleChannelByOriginalName(originalName);
    }

    @Override
    public List<SaleChannel> getAllSaleChannelList() {
        return SaleChannelMapper.getAllSaleChannelList();
    }
    
    @Override
    public void save(SaleChannel SaleChannel) {
        SaleChannelMapper.save(SaleChannel);
    }

    @Override
    public void update(SaleChannel SaleChannel) {
        SaleChannelMapper.update(SaleChannel);
    }

    @Override
    public void deleteById(Integer id) {
        SaleChannelMapper.deleteById(id);
    }

}
